<template>
	<view class="my-mall-good" @click="$goto('/pages/mall/good?id=' + good.id)">
		<!-- <view class="tag">正价 66</view> -->
		<image :src="good.picture" class="img"></image>

		<view class="info">
			<view class="padding-lr-sm">
				<view class="title u-line-2">
					{{good.goods_name}}
				</view>
			</view>

			<view class="flex-row justify-between align-center padding-lr-sm">
				<view class="good-score">
					<text>{{good.price}}</text>
					<text class="sm">积分</text>
				</view>
				<view class="btn">立即兑换</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			good: {
				type: Object,
				default: () => {}
			}
		},
		data() {
			return {

			};
		}
	}
</script>

<style lang="scss">
	.my-mall-good {
		width: 320rpx;
		height: 484rpx;
		background: rgba(255, 255, 255, 1);
		border-radius: 8rpx;
		margin-top: 30rpx;
		overflow: hidden;
		position: relative;
		z-index: 1;

		.tag {
			min-width: 140rpx;
			height: 40rpx;
			line-height: 40rpx;
			background: linear-gradient(270deg, rgba(249, 212, 148, 1) 0%, rgba(233, 192, 128, 1) 100%);
			border-radius: 0rpx 0rpx 8rpx 0rpx;
			position: absolute;
			top: 0;
			left: 0;
			z-index: 3;
			font-size: 20rpx;
			text-align: center;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: rgba(255, 255, 255, 1);
		}

		.img {
			width: 320rpx;
			height: 320rpx;
			display: block;
		}

		.title {
			font-size: 24rpx;
			line-height: 40rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			font-weight: 500;
			color: rgba(51, 51, 51, 1);
		}

		.info {
			height: 164rpx;
			display: flex;
			flex-direction: column;
			justify-content: space-between;
			padding: 16rpx 0;
		}

		.good-score {
			font-size: 28rpx;
			font-family: Helvetica-Bold, Helvetica;
			font-weight: bold;
			color: rgba(255, 139, 86, 1);

			.sm {
				font-size: 22rpx;
			}
		}

		.btn {
			width: 136rpx;
			height: 40rpx;
			line-height: 40rpx;
			text-align: center;
			letter-spacing: 2rpx;
			background: linear-gradient(270deg, rgba(255, 178, 123, 1) 0%, rgba(255, 122, 69, 1) 100%);
			border-radius: 20rpx;
			font-size: 24rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: rgba(255, 255, 255, 1);
		}
	}
</style>
